if (data == NULL)
{
+ gchar *length_str = g_strdup_printf ("%" G_GSIZE_FORMAT, length);
send_response (retr->parent.item_type,
retr->parent.opaque_task,
g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Cannot get clipboard data. Failed to allocate %lu bytes to store the data."), length));
+ _("Cannot get clipboard data. Failed to allocate %s bytes to store the data."), length_str));
+ g_free (length_str);
GlobalUnlock (hdata);
return NULL;
}
thread_wakeup_message = RegisterWindowMessage ("GDK_WORKER_THREAD_WEAKEUP");
user32 = LoadLibrary ("user32.dll");
- win32_clipdrop->GetUpdatedClipboardFormats = GetProcAddress (user32, "GetUpdatedClipboardFormats");
+ win32_clipdrop->GetUpdatedClipboardFormats = (GetUpdatedClipboardFormatsFunc) GetProcAddress (user32, "GetUpdatedClipboardFormats");
FreeLibrary (user32);
atoms = g_array_sized_new (FALSE, TRUE, sizeof (const char *), GDK_WIN32_ATOM_INDEX_LAST);
{
glong rlen;
GError *err = NULL;
- glong size;
+ gsize size;
gint i;
char *strptr, *p;
wchar_t *wcptr;
guint translated_buttons, button_diff, button_mask;
GdkEventType event_type;
- int event_button;
+ int event_button = 0;
GdkModifierType event_state;
double event_x, event_y;
double *axes;
if (data == NULL)
{
+ gchar *length_str = g_strdup_printf ("%" G_GSIZE_FORMAT, length);
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Cannot get DnD data. Failed to allocate %lu bytes to store the data."), length);
+ _("Cannot get DnD data. Failed to allocate %s bytes to store the data."), length_str);
+ g_free (length_str);
GlobalUnlock (hdata);
return NULL;
}
{
LRESULT retval;
- GDK_NOTE (EVENTS, g_print ("%s%*s%s %p %#x %#lx",
+ GDK_NOTE (EVENTS, g_print ("%s%*s%s %p %#" G_GINTPTR_MODIFIER "x %#" G_GINTPTR_MODIFIER "x",
(debug_indent > 0 ? "\n" : ""),
debug_indent, "",
_gdk_win32_message_to_string (message), hwnd,
* FALSE later) or set *ret_valp to 0 and return TRUE.
*/
tmp_style = style | additional_styles;
- GDK_NOTE (EVENTS, g_print (" Handling WM_SYSMENU: style 0x%lx -> 0x%lx\n", style, tmp_style));
+ GDK_NOTE (EVENTS, g_print (" Handling WM_SYSMENU: style 0x%" G_GINTPTR_MODIFIER "x -> 0x%" G_GINTPTR_MODIFIER "x\n", style, tmp_style));
impl->have_temp_styles = TRUE;
impl->temp_styles = additional_styles;
SetWindowLongPtr (msg->hwnd, GWL_STYLE, tmp_style);
tmp_style = GetWindowLongPtr (msg->hwnd, GWL_STYLE);
style = tmp_style & ~additional_styles;
- GDK_NOTE (EVENTS, g_print (" Handling WM_SYSMENU: style 0x%lx <- 0x%lx\n", style, tmp_style));
+ GDK_NOTE (EVENTS, g_print (" Handling WM_SYSMENU: style 0x%" G_GINTPTR_MODIFIER "x <- 0x%" G_GINTPTR_MODIFIER "x\n", style, tmp_style));
SetWindowLongPtr (msg->hwnd, GWL_STYLE, style);
impl->have_temp_styles = FALSE;
gssize result = write_stream (stream, priv, buffer, count, error);
if (result != -1)
- GDK_NOTE(SELECTION, g_printerr ("CLIPBOARD: wrote %zd bytes, %u total now\n",
+ GDK_NOTE(SELECTION, g_printerr ("CLIPBOARD: wrote %zd bytes, %" G_GSIZE_FORMAT " total now\n",
result, priv->data_length));
return result;
if (result != -1)
{
- GDK_NOTE (SELECTION, g_printerr ("CLIPBOARD async wrote %zd bytes, %u total now\n",
+ GDK_NOTE (SELECTION, g_printerr ("CLIPBOARD async wrote %zd bytes, %" G_GSIZE_FORMAT " total now\n",
result, priv->data_length));
g_task_return_int (task, result);
}
GtkIconViewPrivate *priv = icon_view->priv;
GtkOrientation other_orientation = orientation == GTK_ORIENTATION_HORIZONTAL ?
GTK_ORIENTATION_VERTICAL : GTK_ORIENTATION_HORIZONTAL;
- int item_min, item_nat, items, item_size, n_items;
+ int item_min, item_nat, items = 0, item_size = 0, n_items;
if (gtk_icon_view_is_empty (icon_view))
{
GtkIconViewPrivate *priv = icon_view->priv;
GtkWidget *widget = GTK_WIDGET (icon_view);
GList *items;
- gint item_width; /* this doesn't include item_padding */
+ gint item_width = 0; /* this doesn't include item_padding */
gint n_columns, n_rows, n_items;
gint col, row;
GtkRequestedSize *sizes;